package com.hlhj.carview.utils

import android.annotation.SuppressLint
import android.content.Context
import com.example.mymvp.log
import com.hlhj.carview.customView.LoadingDialog

/**
 * Created by Never Fear   on 2019\1\9 0009.
Never More....
 */
object LoadingUtil {
    @SuppressLint("StaticFieldLeak")
    var a=1;
    private var loadingDialog: LoadingDialog?=null
    fun show(c: Context){
        log("","出现的时候a=${a}")
        a++
        if (loadingDialog==null){
            loadingDialog=LoadingDialog(c)
            loadingDialog?.show()
        }
    }

    fun diss(){
        log("","消失的时候a=${a}")
        loadingDialog?.dismiss()
        loadingDialog=null
    }
}